Tidal Prediction Program for the Psion Series 3a ------------------------------------------------ VERSION 2 - 5 October 1995 -------------------------- USER GUIDE ---------- First of all, my sincere thanks to all of you who have written to me with suggestions for improvements to Version 1. I WILL respond to each of you individually, soon. This new release is still far from perfect, but I hope you will agree that it is much better than version 1. I will continue to develop the programme as time permits and once again I welcome any suggestions you may have. I haven't given the subject of Shareware and Registration much thought yet but I suppose my target price will be in the region of 10 to 15 pounds sterling. Purpose: -------- TidesV02 is intended for anyone who is interested in predicting the heights of the tide. It employs the Admiralty's Simplified Harmonic Method for tide prediction. It will never produce results which are the same as the published Tide Tables and MUST NEVER be considered as a substitute for them. However, it comes very close ! Version 1.02, will only work until 31 December 1995. Features: --------- 1. Simple graphical output of the tide prediction for a 24-hour period. 2. Screen listing of heights at half-hourly intervals. 3. Listing to Text File of heights at half-hourly intervals. 4. Screen listing of the Harmonic Constants employed. 5. Editing facility to add, change and delete Harmonic Constants records from the database. 6. Backup and Restore commands for the database. 7. Menu and hotkey commands. 8. Eighty Five (85) places and ports in the database. 9. Initialisation dialogue on first load to setup paths for files. Known Defficiences: ------------------- 1. There is no online Help 2. Parts of the input validation routines are too slow and should be improved. 3. The sort routine is not the most efficient available, but it is short ! 4. No direct print routine of the graphics display. Planned Enhancements: --------------------- 1. Optional on-line Help. 2. Astronomical data screen showing sun, moon, major planets and stars. 3. Links to Agenda and World. 4. Waypoint database for route planning etc. 5. Graphical output to printer. 6. More compact file structures. 7. Background, batch routine to pre-process output ready for use. Installation: ------------- The zip file TIDESV02.ZIP comprises the following files : README02.TXT ..........This text file TIDESV02.OPA ..........The OPA application file TIDESV02.HCS ..........The Database of ports Harmonic Constants Hopefully, you will read this document before doing anything else !!!! The files may be placed anywhere on your system. My suggestion is that you place the TIDESV02.OPA file in an \APP\ directory and create a new directory called \TIDESV02 to contain the database file TIDESV02.HCS. Once you have installed the OPA, and run it, the program executes a short initialisation sequence requesting the path name of the directory in which you stored the HCS file. If it finds it there, it then creates TIDESV02.INI in the same directory as the one that contains the OPA file and then never bothers you again. The default path-name is stored in the INI file which is read every time the application loads. If you want to change the default path, just delete the INI file and go through the dialogue again. In my setup, I only have the standard 512k of ram with no other SSDs. It looks like this : Disk Internal \APP\ TIDESV02.INI TIDESV02.OPA \TIDESV02\ DEFAULT .TXT TIDESV02.BAK TIDESV02.DBF TIDESV02.AFS TIDESV02.HCS TIDESV02.HTS The other files are all created as necessary by the program. The key files are the AFS and HTS files which contain the results of many of the calculations to avoid having to re-calculate every time for the same port and date. As the records become 'out-of-date' the program deletes them in order to keep the size of the files down. This might cause problems if you chose Flash SSD to contain your default path. The BAK file is created when you edit the HCS file. It may be restored if you aren't happy with the results. DEFAULT.TXT is the default name of the file to which the half-hourly heights are listed. I expect you will choose a meaningful name such as 'DOVER.TXT' etc... The DBF file is a mere skeleton of the file used to link with the DATA application. It is cleared down as valid records are imported into the HCS database file. Only invalid records will remain in this file for re-editing. Operation: ---------- I have populated the HCS database file with the Harmonic Constants for 85 locations : Barrow (Ramsden Dock) Nab Tower Bergen (Norway) Narvik (Norway) Brightlingsea Newquay Bristol (Avonmouth) Northney Brodick Bay Oban Bucklers Hard Padstow Campbeltown Plymouth (Devonport) Cherbourg (France) Poole (Entrance) Chichester Harbour (Entrance) Poole (Town Quay) Cowes (Isle of Wight) Port of Kem' (Russia) Craighouse Portland Cuxhaven (Germany) Portsmouth Dartmouth Ramsgate Deal River Tees Entrance Dover Rosyth Dunbar Ryde (Isle of Wight) Esbjerg (Denmark) Selsey Bill Exmouth (Approaches) Sheerness Exmouth Dock Shoreham Falmouth Solva Felixstowe Pier Southampton Fidra St. Ives Fishguard St. Mary's (Isles of Scilly) Foreland (Lifeboat Slip, IOW) St. Vaast-la-Hougue (France) Glasgow Stansore Point Greenock Stonehaven Hamburg (Germany) Stornoway Harwich Swanage Holyhead Tarbert Island (Ireland) Inverness Teignmouth (Approaches) Ipswich Teignmouth (Shaldon Bridge) Itchenor Tilbury Knights Town (Ireland) Tobermory Kyle of Lochalsh Torquay Le Havre (France) Troon Leith Ullapool Lisbon (Portugal) Ventnor (Isle of Wight) Llandudno Walton-on-the-Naze London Bridge West Mersea Lymington Wick Margate Wilhelmshaven (Germany) Menai Bridge Yarmouth (Isle of Wight) Milford Haven The initial dialog invites you to choose one of these ports along with the date and time you would like to predict the tides. Then it calculates various factors due to the longitude of the sun and moon and some constant data for the chosen location to produce a 24 hour tidal prediction curve. Once a curve is displayed, you may adjust the time in several ways by pressing 'hot keys' : + (PLUS) ...........Advances the time by 5 minutes - (MINUS) ..........Retards the time by 5 minutes UP Arrow ...........Advances the time by 1 hour DOWN Arrow .........Retards the time by 1 hour RIGHT Arrow ........Advances the time by 15 minutes LEFT Arrow .........Retards the time by 15 minutes PSION UP Arrow .....Advances the time by 6 hours PSION DOWN Arrow ...Retards the time by 6 hours PSION UP Arrow .....Advances the time by 3 hours PSION DOWN Arrow ...Retards the time by 3 hours Other Hot keys are : ENTER ..............Invites you to input the date & time t or PSION t .......Invites you to input the time only s or PSION s .......Invites you to select a new place, date & time c or PSION c .......Displays the current Harmonic Constants h or PSION h .......Displays half-hourly heights f or PSION f .......Prompts for a file name for listing heights PSION n ............Launches the DATA application so you can create new port/place records PSION e ............Copies the current port/place to a DBF file and launches the DATA application so you can edit and/or create new port/place records PSION w ............Allows you to delete (wipe) a record from the HCS file PSION SHIFT E ......Copies ALL of the port/place records to a DBF file so you can edit, list etc to your hearts content. BEWARE : This is a very lengthy process since the program has to validate every record. Be patient it will finish. It then sorts the records. If you are not happy with your chages then you are able to 'Discard' them before finally writing them back to the file. PSION b ............Creates a backup of the main HCS file PSION r ............Restores the main HCS file from the backup PSION x ............Exits the program - but not before tidying up redundant records from the AFS and HTS files. MENU ...............Presents a menu with most of the above. During several processes, the program displays a busy signal while it calculates literally hundreds of formulae. During critical file IO activities, program locks are applied temporarily to prevent corrupting the files. The program is littered with dialogs to confirm actions so you can't do anything seriously wrong without getting a chance to think again. If you do get tied up in knots, you can simply reinstall and start again. Editing Rules: -------------- The program outputs the Harmonic Constants for you to edit into a DATA file named TIDESV02.DBF. Then it launches the DATA application and waits for it to exit. On exit it processes all of the file and validates the records. If it detects an error it will write 'ERROR' into the field and update the record. Valid records are allowed to update the main HCS database and are then deleted from the DBF file. Any invalid records are left behind in the DBF file and the DATA application is relaunched for you to inspect and re-edit them. Look for fields with contents 'ERROR'. Error records are also marked in the ID field with the word 'ERROR', this must also be re-edited, but note that it doesn't overwrite the originl content of the ID field, just appends to it. In order to edit or create new records you must have access to one of the Admiralty Tide Tables (publcation nos :NP201, NP202, NP203 or NP160). The fields needed can be found in Parts 1,2,3 and in Table VI. The format required is as follows : Place: up to 32 characters, no validation ID: the id from the first column of ATT Part 3, max 5 characters Lat'd: The Latitude of the place format can use a decimal point in place of the degree symbol, upper or lower case NnSs eg 55.23n Take from ATT Part 1 or Part 2 Long: as for Lat'd except must be EeWw eg 2.34e Zone: allows 0,GMT,UTGMT or in format of -0100, take from ATT Part 3 ML Z0: directly from ATT Part 3, third column. If no data is given ie. the field contains 'w' then input an asteriski *. This indicates that the ML fluctuates markedly according to the proximity of springs. See fields ML(Sp) and ML(+7) below. M2 g: These and the following fields down to F 6: are taken directly M2 H: from ATT Part 3. As above, if no data is in this column input an S2 g: asterisk *. S2 H: , K1 g: , K1 H: , O1 g: , O1 H: , f 4: , F 4: , f 6: , F 6: SC (12):Take directly from ATT Part 3 . If the data given is 'negligible' M2 (12):or not given then as before, iput a single asterisk *. S2 (12):The 12 values should be separated by a comma Lag(x): This is the number of days lag behind new or full moon that springs occur. It is taken either from ATT Part 1 or from the supplementary tables Table VI in the second column (x). ML(Sp): This and the following field is given when no data is provided in ML(+-7):the MLZ0 field. The values we're interested in are in Table VI columns labelled 'At Springs' for ML(Sp) and labelled '1' to '7' for ML(+-7). The ML(+-7) fields should be separated by commas. Have a good look through th TIDESV02.DBF file once you have exported ALL the constants and you will soon get the hang of it. Finally, as ever, I welcome comments and suggestions to improve this program. Have fun. Stephen Muchow Compuserve Mail 100432,3316